<template>
  <el-dialog
    :title="viewMode ? '查看填报数据' : '在线填报'"
    :close-on-click-modal="false"
    :visible.sync="visible"
    width="65%"
    fullscreen>
    <el-form class="family-report5" :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
    <table style="width: 900px;" class="table table-bordered">
			<tbody><tr>
				<td colspan="10" class="title">
					家庭林场基本信息
				</td>
			</tr>
			<tr>
				<td>
					家庭林场名称
				</td>
				<td colspan="9" class="title">
					<input v-model="dataForm.famName" type="text" class="form-control" name="familyName">
				</td>
			</tr>
			<tr>
				<td>
					创建人姓名
				</td>
				<td colspan="4">
					<input v-model="dataForm.createName" type="text" class="form-control" name="relName">
				</td>
				<td style="width: 140px;">
					创建人年龄
				</td>
				<td colspan="4">
					<input v-model="dataForm.createAge" onkeyup="this.value=this.value.replace(/\D/g,'')" type="text" class="form-control" name="age">
				</td>
			</tr>
			<tr>
				<td>
					创建人性别
				</td>
				<td colspan="4">
					<input v-model="dataForm.createSex" type="text" class="form-control" name="sex">
				</td>
				<td>
					创建人受教育程度
				</td>
				<td colspan="4">
					<input v-model="dataForm.createEdu" type="text" class="form-control" name="educationalLevel">
				</td>
			</tr>
			<tr>
				<td>
					创建人职业
				</td>
				<td colspan="4">
					<input v-model="dataForm.createPosition" type="text" class="form-control" name="occupation">
				</td>
				<td>
					创建人年收入
				</td>
				<td colspan="4">
					<input v-model="dataForm.createIncome" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control" name="yearIncome">
				</td>
			</tr>
			<tr>
				<td>
					家庭林场经营模式
				</td>
				<td colspan="9">
					<input v-model="dataForm.famMode" type="radio" value="自营" name="operationMode"><label>自营</label>
					<input v-model="dataForm.famMode" type="radio" value="承包" name="operationMode"><label>承包</label>
				</td>
			</tr>
			<tr>
				<td>
					成立时间
				</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.beginYear" type="text" class="form-control" name="gmtCreate">
						<span class="input-group-addon">年</span>
					</div>
				</td>
				<td>
					注册资本
				</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.regAssert" type="text" class="form-control" name="registeredCapital">
						<span class="input-group-addon">万元</span>
					</div>
				</td>
			</tr>
			<tr>
				<td>
					营业收入
				</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.busIncome" type="text" class="form-control" name="businessIncome">
						<span class="input-group-addon">万元/年</span>
					</div>
				</td>
				<td>
					营业成本
				</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.busCost" type="text" class="form-control" name="businessCost">
						<span class="input-group-addon">万元/年</span>
					</div>
				</td>
			</tr>
			<tr>
				<td>
					家庭林场融资渠道
				</td>
				<td colspan="9">
					<input v-model="dataForm.moneySource" type="radio" value="政府" name="financingChannel"><label name="revenueLabel">政府</label>
					<input v-model="dataForm.moneySource" type="radio" value="银行贷款" name="financingChannel"><label name="bankLabel">银行贷款</label>
					<input v-model="dataForm.moneySource" type="radio" value="自筹" name="financingChannel"><label name="companyLabel">自筹</label>
					<input v-model="dataForm.moneySource" type="radio" value="社会捐助 " name="financingChannel"><label name="sociologyLabel">社会捐助</label><br>
					<input v-model="dataForm.moneySourceOther" type="checkbox" value="0" id="otherCheckbox" onclick="otherCheckboxCheck()"><label name="otherLabel">其他来源</label> <input v-model="dataForm.moneySourceValue" type="text" class="form-control" name="financingChannelOther"><br>
				</td>
			</tr>
			<tr>
				<td>
					获财政扶持资金总额
				</td>
				<td colspan="9">
					<div class="input-group">
						<input v-model="dataForm.govSupport" type="text" class="form-control" name="supportFunds">
						<span class="input-group-addon">万元/年</span>
					</div>
				</td>
			</tr>
			<tr>
				<td colspan="10" class="title">
					家庭林场主营业务情况
				</td>
			</tr>
			<tr>
				<td rowspan="12">
					主营业务类别 （可多选，在相应的□内打√，并填上产量或产值）
				</td>
				<td colspan="6">
					主营业务
				</td>
				<td colspan="3">
					产量或产值
				</td>
			</tr>
			<tr>
				<td colspan="6">
					<input v-model="dataForm.mainBusType" type="checkbox" value="forest" class="mainBusiness"><label name="forestLabel" id="a" value="1">林木育种育苗，具体类别：</label>
					<input v-model="dataForm.service" type="text" class="form-control" name="forestService">
					<input type="text" id="forestId" name="forestId" style="display:none" value="">
				</td>
				<td colspan="3">
					<br>
			        <div class="input-group">
						<input v-model="dataForm.yield" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control"  name="forestYield">
						<span class="input-group-addon">株</span>
					</div>
				</td>
			</tr>
			<tr>
				<td colspan="6">
					<input v-model="dataForm.mainBusType2" type="checkbox" value="buildingForest" class="mainBusiness"><label name="buildingForestLabel">营造林，具体类别：</label>
					<input v-model="dataForm.service2" type="text" class="form-control"  name="buildingForestService">
					<input type="text" id="buildingForestId" name="buildingForestId" style="display:none" value=""> 
				</td>
				<td colspan="3">
					<br>
				    <div class="input-group">
						<input v-model="dataForm.yield2" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control"  name="buildingForestYield">
						<span class="input-group-addon">亩</span>
					</div>
				</td>
			</tr>
			<tr>
				<td colspan="6">
					<input v-model="dataForm.mainBusType3" type="checkbox" value="phyllostachys" class="mainBusiness"><label name="phyllostachysLabel">木竹采运，具体类别：</label>
					<input v-model="dataForm.service3" type="text" class="form-control"  name="phyllostachysService">
					<input type="text" id="phyllostachysId" name="phyllostachysId" style="display:none" value=""> 
				</td>
				<td colspan="3">
					<br>
				    <div class="input-group">
						<input v-model="dataForm.yield3" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control"  name="phyllostachysYield">
						<span class="input-group-addon">立方米/根</span>
					</div>
				</td>
			</tr>
			<tr>
				<td colspan="6">
					<input v-model="dataForm.mainBusType4" type="checkbox" value="economicForest" class="mainBusiness"><label name="economicForestLabel">经济林产品种植，具体类别</label>
					<input v-model="dataForm.service4" type="text" class="form-control"  name="economicForestService">
					<input type="text" id="economicForestId" name="economicForestId" style="display:none" value=""> 
				</td>
				<td colspan="3">
					<br>
				    <div class="input-group">
						<input v-model="dataForm.yield4" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control"  name="economicForestYield">
						<span class="input-group-addon">亩</span>
					</div>
				</td>
			</tr>
			<tr>
				<td colspan="6">
					<input v-model="dataForm.mainBusType5" type="checkbox" value="flowersOther" class="mainBusiness"><label name="flowersOtherLabel">花卉及其他观赏植物种植，具体类别：</label>
					<input v-model="dataForm.service5" type="text" class="form-control"  name="flowersOtherService">
					<input type="text" id="flowersOtherId" name="flowersOtherId" style="display:none" value=""> 
				</td>
				<td colspan="3">
					<br>
				    <div class="input-group">
						<input v-model="dataForm.yield5" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control"  name="flowersOtherYield">
						<span class="input-group-addon">枝/盆/株</span>
					</div>
				</td>
			</tr>
			<tr>
				<td colspan="6">
					<input v-model="dataForm.mainBusType6" type="checkbox" value="undergrowth" class="mainBusiness"><label name="undergrowthLabel">林下畜类养殖，具体类别：</label>
					<input v-model="dataForm.service6" type="text" class="form-control"  name="undergrowthService">
					<input type="text" id="undergrowthId" name="undergrowthId" style="display:none" value=""> 
				</td>
				<td colspan="3">
					<br>
				    <div class="input-group">
						<input v-model="dataForm.yield6" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control"  name="undergrowthYield">
						<span class="input-group-addon">只/头</span>
					</div>
				</td>
			</tr>
			<tr>
				<td colspan="6">
					<input v-model="dataForm.mainBusType7" type="checkbox" value="understoryPoultry" class="mainBusiness"><label name="understoryPoultryLabel">林业禽类养殖，具体类别：</label>
					<input v-model="dataForm.service7" type="text" class="form-control"  name="understoryPoultryService">
					<input type="text" id="understoryPoultryId" name="understoryPoultryId" style="display:none" value="">
				</td>
				<td colspan="3">
					<br>
				    <div class="input-group">
						<input v-model="dataForm.yield7" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control"  name="understoryPoultryYield">
						<span class="input-group-addon">只</span>
					</div>
				</td>
			</tr>
			<tr>
				<td colspan="6">
					<input v-model="dataForm.mainBusType8" type="checkbox" value="underforestBee" class="mainBusiness"><label name="underforestBeeLabel">林下养蜂：</label>
				</td>
				<td colspan="3">
				    <div class="input-group">
						<input v-model="dataForm.yield8" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control"  name="underforestBeeYield">
						<input type="text" id="underforestBeeId" name="underforestBeeId" style="display:none" value="">
						<span class="input-group-addon">箱</span>
					</div>
				</td>
			</tr>
			<tr>
				<td colspan="6">
					<input v-model="dataForm.mainBusType9" type="checkbox" value="medicinalFungus" class="mainBusiness"><label name="medicinalFungusLabel">药材种植及食用菌栽培，具体类别：</label>
					<input v-model="dataForm.service9" type="text" class="form-control" name="medicinalFungusService" >
					<input type="text" id="medicinalFungusId" name="medicinalFungusId" style="display:none" value="">
				</td>
				<td colspan="3">
				<br>
				    <div class="input-group">
						<input v-model="dataForm.yield9" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control"  name="medicinalFungusYield">
						<span class="input-group-addon">亩</span>
					</div>
				</td>
			</tr>
			<tr>
				<td colspan="6">
					<input v-model="dataForm.mainBusType10" type="checkbox" value="woodBambooProcessing" class="mainBusiness"><label name="woodBambooProcessingLabel">木竹经营加工，具体类别：</label>
					<input v-model="dataForm.service10" type="text" class="form-control" name="woodBambooProcessingService" >
					<input type="text" id="woodBambooProcessingId" name="woodBambooProcessingId" style="display:none" value="">
				</td>
				<td colspan="3">
				<br>
				    <div class="input-group">
						<input v-model="dataForm.yield10" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control"  name="woodBambooProcessingYield">
						<span class="input-group-addon">立方米</span>
					</div>
				</td>
			</tr>
			<tr>
				<td colspan="6">
					<input v-model="dataForm.mainBusType11" type="checkbox" value="businessOther" class="mainBusiness"><label name="businessOtherLabel">其他：</label>
					<input v-model="dataForm.service11" type="text" class="form-control" name="businessOtherService" >
					<input type="text" id="businessOtherId" name="businessOtherId" style="display:none" value="">
				</td>
				<td colspan="3">
				<br>
				    <div class="input-group">
						<input v-model="dataForm.yield11" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control"  name="businessOtherYield">
						<span class="input-group-addon">万元</span>
					</div>
				</td>
			</tr>
			<tr>
				<td>经营林地面积</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.busArea" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control" name="forestryArea">
						<span class="input-group-addon">亩</span>
					</div>
				</td>
				<td>主营产品销售收入</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.saleIncome" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control" name="salesRevenue">
						<span class="input-group-addon">万元/年</span>
					</div>
				</td>
			</tr>
			<tr>
				<td>主营产品利润额</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.prodProfit" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control" name="profitMargin">
						<span class="input-group-addon">万元/年</span>
					</div>
				</td>
				<td>主营产品利润率</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.profitRate" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control" name="profitMarginProportion">
						<span class="input-group-addon">%</span>
					</div>
				</td>
			</tr>
			<tr><td colspan="10" class="title">家庭林场成员及收益</td></tr>
			<tr>
				<td>家庭成员人数</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.famNum" onkeyup="this.value=this.value.replace(/\D/g,'')" type="text" class="form-control" name="familyMemberNum">
						<span class="input-group-addon">人</span>
					</div>
				</td>
				<td>家庭成员劳动年龄人数</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.famWorkNum" onkeyup="this.value=this.value.replace(/\D/g,'')" type="text" class="form-control" name="familyMemberLabourNum">
						<span class="input-group-addon">人</span>
					</div>
				</td>
			</tr>
			<tr>
				<td>家庭成员在林场工作人数</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.famInfrtNum" onkeyup="this.value=this.value.replace(/\D/g,'')" type="text" class="form-control" name="forestsNum">
						<span class="input-group-addon">人</span>
					</div>
				</td>
				<td>家庭成员在政府部门工作人数</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.famIngovNum" onkeyup="this.value=this.value.replace(/\D/g,'')" type="text" class="form-control" name="governmentWorkNum">
						<span class="input-group-addon">人</span>
					</div>
				</td>
			</tr>
			<tr>
				<td>家庭成员高中及以上文化程度人数</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.famHighNum" onkeyup="this.value=this.value.replace(/\D/g,'')" type="text" class="form-control" name="highSchoolCultureNum">
						<span class="input-group-addon">人</span>
					</div>
				</td>
				<td>家庭成员人均年收入</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.famIncome" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control" name="yearIncome2">
						<span class="input-group-addon">万元/年</span>
					</div>
				</td>
			</tr>
			<tr><td colspan="10" class="title">家庭林场经营与发展</td></tr>
			<tr>
				<td>家庭林场接受技术培训次数</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.trainNum" onkeyup="this.value=this.value.replace(/\D/g,'')" type="text" class="form-control" name="technologyNum">
						<span class="input-group-addon">次/年</span>
					</div>
				</td>
				<td>购买商品林保险</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.secureAmount" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');"  type="text" class="form-control" name="buyInsurance">
						<span class="input-group-addon">万元/年</span>
					</div>
				</td>
			</tr>
			<tr>
				<td>是否注册林产品商标</td>
				<td colspan="4">
					<input v-model="dataForm.isRegBrand" type="radio" value="是" name="ifRegisterForestTrademark"><label>是</label>
					<input v-model="dataForm.isRegBrand" type="radio" value="否" name="ifRegisterForestTrademark"><label>否</label>
				</td>
				<td>商标名称</td>
				<td colspan="4">
					<input v-model="dataForm.brandName"  type="text" class="form-control" name="trademarkName">
				</td>
			</tr>
			<tr>
				<td>长期雇工人数</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.longEmployee" onkeyup="this.value=this.value.replace(/\D/g,'')" type="text" class="form-control" name="longEmployeeNum">
						<span class="input-group-addon">人/年</span>
					</div>
				</td>
				<td>年支付工资总额</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.longSalary" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control" name="longPaymentWages">
						<span class="input-group-addon">万元</span>
					</div>
				</td>
			</tr>
			<tr>
				<td>临时雇工人次</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.shortEmployee" onkeyup="this.value=this.value.replace(/\D/g,'')" type="text" class="form-control" name="temporaryEmployeeNum">
						<span class="input-group-addon">次/年</span>
					</div>
				</td>
				<td>年支付工资总额</td>
				<td colspan="4">
					<div class="input-group">
						<input v-model="dataForm.shortSalary" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(isNaN(value))execCommand('undo');" type="text" class="form-control" name="temporaryPaymentWages">
						<span class="input-group-addon">万元</span>
					</div>
				</td>
			</tr>
			
			
			<tr>
				<td>负责人:</td>
				<td><input v-model="dataForm.dutyer" name="leadingOfficial" type="text" class="form-control"></td>
				<td colspan="2">填报人:</td>
				<td><input v-model="dataForm.reporter" name="fillPerson" type="text" class="form-control"></td>
				<td colspan="4">填表日期:</td>
				<td><el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="dataForm.reportTime" size="mini" type="datetime" ></el-date-picker></td>
			</tr>
			<tr>
					<td colspan="10" style="">填报说明：本表指标一律保留小数点后两位数。</td>
			</tr>
			</tbody>
    </table> 
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="visible = false">取消</el-button>
      <el-button v-if="!viewMode" type="primary" @click="dataFormSubmit()">确定</el-button>
    </span>
  </el-dialog>
</template>

<script>
  export default {
    data () {
      return {
				visible: false,
				viewMode: false,
        dataForm: {
          reportId: 0,
          taskUserId: '',
          dutyer: '',
          reporter: '',
          reportTime: '',
          famName: '',
          createName: '',
          createAge: '',
          createSex: '',
          createEdu: '',
          createPosition: '',
          createIncome: '',
          famMode: '',
          regAssert: '',
          beginYear: '',
          busIncome: '',
          busCost: '',
					moneySource: '',
					moneySourceOther: '',
					moneySourceValue: '',
          govSupport: '',
          mainBusType: '',
		  service: '',
	yield: '',
	mainBusType2: '',
	service2: '',
	yield2: '',
	mainBusType3: '',
	service3: '',
	yield3: '',
	mainBusType4: '',
	service4: '',
	yield4: '',
	mainBusType5: '',
	service5: '',
	yield5: '',
	mainBusType6: '',
	service6: '',
	yield6: '',
	mainBusType7: '',
	service7: '',
	yield7: '',
	mainBusType8: '',
	yield8: '',
	mainBusType9: '',
	service9: '',
	yield9: '',
	mainBusType10: '',
	service10: '',
	yield10: '',
	mainBusType11: '',
	service11: '',
	yield11: '',
          busArea: '',
          saleIncome: '',
          prodProfit: '',
          profitRate: '',
          famNum: '',
          famWorkNum: '',
          famInfrtNum: '',
          famIngovNum: '',
          famHighNum: '',
          famIncome: '',
          trainNum: '',
          secureAmount: '',
          isRegBrand: '',
          brandName: '',
          longEmployee: '',
          longSalary: '',
          shortEmployee: '',
          shortSalary: ''
        },
        dataRule: {
        }
      }
    },
    methods: {
     init (taskUserId, reportId, mode) {
				if(mode == 'view'){
					this.viewMode = true;
				}else{
					this.viewMode = false;
				}
        this.dataForm.reportId = reportId || 0
        this.dataForm.taskUserId = taskUserId || 0
        this.visible = true
        this.$nextTick(() => {
		  this.$refs['dataForm'].resetFields()
          if (this.dataForm.taskUserId) {
            this.$http({
              url: this.$http.adornUrl(`/frt/familyreport5/info/${this.dataForm.taskUserId}`),
              method: 'get',
              params: this.$http.adornParams()
            }).then(({data}) => {
              if (data && data.code === 0) {
                this.dataForm.dutyer = data.familyreport5.dutyer
                this.dataForm.reporter = data.familyreport5.reporter
                this.dataForm.reportTime = data.familyreport5.reportTime
                this.dataForm.famName = data.familyreport5.famName
                this.dataForm.createName = data.familyreport5.createName
                this.dataForm.createAge = data.familyreport5.createAge
                this.dataForm.createSex = data.familyreport5.createSex
                this.dataForm.createEdu = data.familyreport5.createEdu
                this.dataForm.createPosition = data.familyreport5.createPosition
                this.dataForm.createIncome = data.familyreport5.createIncome
                this.dataForm.famMode = data.familyreport5.famMode
                this.dataForm.regAssert = data.familyreport5.regAssert
                this.dataForm.beginYear = data.familyreport5.beginYear
                this.dataForm.busIncome = data.familyreport5.busIncome
                this.dataForm.busCost = data.familyreport5.busCost
				this.dataForm.moneySource = data.familyreport5.moneySource
				
				if(data.familyreport5.moneySourceOther == 'true'){
					this.dataForm.moneySourceOther = true
					this.dataForm.moneySourceValue = data.familyreport5.moneySourceValue
				}else{
					this.dataForm.moneySourceOther = false
					this.dataForm.moneySourceValue = ''
				}

                this.dataForm.govSupport = data.familyreport5.govSupport
				this.dataForm.mainBusType = data.familyreport5.mainBusType
				
				this.dataForm.service = data.familyreport5.service
	this.dataForm.yield = data.familyreport5.yield
	this.dataForm.mainBusType2 = data.familyreport5.mainBusType2
	this.dataForm.service2 = data.familyreport5.service2
	this.dataForm.yield2 = data.familyreport5.yield2
	this.dataForm.mainBusType3 = data.familyreport5.mainBusType3
	this.dataForm.service3 = data.familyreport5.service3
	this.dataForm.yield3 = data.familyreport5.yield3
	this.dataForm.mainBusType4 = data.familyreport5.mainBusType4
	this.dataForm.service4 = data.familyreport5.service4
	this.dataForm.yield4 = data.familyreport5.yield4
	this.dataForm.mainBusType5 = data.familyreport5.mainBusType5
	this.dataForm.service5 = data.familyreport5.service5
	this.dataForm.yield5 = data.familyreport5.yield5
	this.dataForm.mainBusType6 = data.familyreport5.mainBusType6
	this.dataForm.service6 = data.familyreport5.service6
	this.dataForm.yield6 = data.familyreport5.yield6
	this.dataForm.mainBusType7 = data.familyreport5.mainBusType7
	this.dataForm.service7 = data.familyreport5.service7
	this.dataForm.yield7 = data.familyreport5.yield7
	this.dataForm.mainBusType8 = data.familyreport5.mainBusType8
	this.dataForm.yield8 = data.familyreport5.yield8
	this.dataForm.mainBusType9 = data.familyreport5.mainBusType9
	this.dataForm.service9 = data.familyreport5.service9
	this.dataForm.yield9 = data.familyreport5.yield9
	this.dataForm.mainBusType10 = data.familyreport5.mainBusType10
	this.dataForm.service10 = data.familyreport5.service10
	this.dataForm.yield10 = data.familyreport5.yield10
	this.dataForm.mainBusType11 = data.familyreport5.mainBusType11
	this.dataForm.service11 = data.familyreport5.service11
	this.dataForm.yield11 = data.familyreport5.yield11

                this.dataForm.busArea = data.familyreport5.busArea
                this.dataForm.saleIncome = data.familyreport5.saleIncome
                this.dataForm.prodProfit = data.familyreport5.prodProfit
                this.dataForm.profitRate = data.familyreport5.profitRate
                this.dataForm.famNum = data.familyreport5.famNum
                this.dataForm.famWorkNum = data.familyreport5.famWorkNum
                this.dataForm.famInfrtNum = data.familyreport5.famInfrtNum
                this.dataForm.famIngovNum = data.familyreport5.famIngovNum
                this.dataForm.famHighNum = data.familyreport5.famHighNum
                this.dataForm.famIncome = data.familyreport5.famIncome
                this.dataForm.trainNum = data.familyreport5.trainNum
                this.dataForm.secureAmount = data.familyreport5.secureAmount
                this.dataForm.isRegBrand = data.familyreport5.isRegBrand
                this.dataForm.brandName = data.familyreport5.brandName
                this.dataForm.longEmployee = data.familyreport5.longEmployee
                this.dataForm.longSalary = data.familyreport5.longSalary
                this.dataForm.shortEmployee = data.familyreport5.shortEmployee
                this.dataForm.shortSalary = data.familyreport5.shortSalary
              }
            })
          }
        })
      },
      // 表单提交
      dataFormSubmit () {
        this.$refs['dataForm'].validate((valid) => {
          if (valid) {
            this.$http({
              url: this.$http.adornUrl(`/frt/familyreport5/${!this.dataForm.reportId ? 'save' : 'update'}`),
              method: 'post',
              data: this.$http.adornData({
                'reportId': this.dataForm.reportId || undefined,
                'taskUserId': this.dataForm.taskUserId,
                'dutyer': this.dataForm.dutyer,
                'reporter': this.dataForm.reporter,
                'reportTime': this.dataForm.reportTime,
                'famName': this.dataForm.famName,
                'createName': this.dataForm.createName,
                'createAge': this.dataForm.createAge,
                'createSex': this.dataForm.createSex,
                'createEdu': this.dataForm.createEdu,
                'createPosition': this.dataForm.createPosition,
                'createIncome': this.dataForm.createIncome,
                'famMode': this.dataForm.famMode,
                'regAssert': this.dataForm.regAssert,
                'beginYear': this.dataForm.beginYear,
                'busIncome': this.dataForm.busIncome,
                'busCost': this.dataForm.busCost,
								'moneySource': this.dataForm.moneySource,
								'moneySourceOther': this.dataForm.moneySourceOther,
								'moneySourceValue': this.dataForm.moneySourceValue,
                'govSupport': this.dataForm.govSupport,
				'mainBusType': this.dataForm.mainBusType,
				
				'service': this.dataForm.service,
	'yield': this.dataForm.yield,
	'mainBusType2': this.dataForm.mainBusType2,
	'service2': this.dataForm.service2,
	'yield2': this.dataForm.yield2,
	'mainBusType3': this.dataForm.mainBusType3,
	'service3': this.dataForm.service3,
	'yield3': this.dataForm.yield3,
	'mainBusType4': this.dataForm.mainBusType4,
	'service4': this.dataForm.service4,
	'yield4': this.dataForm.yield4,
	'mainBusType5': this.dataForm.mainBusType5,
	'service5': this.dataForm.service5,
	'yield5': this.dataForm.yield5,
	'mainBusType6': this.dataForm.mainBusType6,
	'service6': this.dataForm.service6,
	'yield6': this.dataForm.yield6,
	'mainBusType7': this.dataForm.mainBusType7,
	'service7': this.dataForm.service7,
	'yield7': this.dataForm.yield7,
	'mainBusType8': this.dataForm.mainBusType8,
	'yield8': this.dataForm.yield8,
	'mainBusType9': this.dataForm.mainBusType9,
	'service9': this.dataForm.service9,
	'yield9': this.dataForm.yield9,
	'mainBusType10': this.dataForm.mainBusType10,
	'service10': this.dataForm.service10,
	'yield10': this.dataForm.yield10,
	'mainBusType11': this.dataForm.mainBusType11,
	'service11': this.dataForm.service11,
	'yield11': this.dataForm.yield11,

                'busArea': this.dataForm.busArea,
                'saleIncome': this.dataForm.saleIncome,
                'prodProfit': this.dataForm.prodProfit,
                'profitRate': this.dataForm.profitRate,
                'famNum': this.dataForm.famNum,
                'famWorkNum': this.dataForm.famWorkNum,
                'famInfrtNum': this.dataForm.famInfrtNum,
                'famIngovNum': this.dataForm.famIngovNum,
                'famHighNum': this.dataForm.famHighNum,
                'famIncome': this.dataForm.famIncome,
                'trainNum': this.dataForm.trainNum,
                'secureAmount': this.dataForm.secureAmount,
                'isRegBrand': this.dataForm.isRegBrand,
                'brandName': this.dataForm.brandName,
                'longEmployee': this.dataForm.longEmployee,
                'longSalary': this.dataForm.longSalary,
                'shortEmployee': this.dataForm.shortEmployee,
                'shortSalary': this.dataForm.shortSalary
              })
            }).then(({data}) => {
              if (data && data.code === 0) {
                this.$message({
                  message: '操作成功',
                  type: 'success',
                  duration: 1500,
                  onClose: () => {
                    this.visible = false
                    this.$emit('refreshDataList')
                  }
                })
              } else {
                this.$message.error(data.msg)
              }
            })
          }
        })
      }
    }
  }
</script>

<style lang="scss">
			.family-report5 table {
				border-collapse: collapse;
			}
			
			.family-report5 td {
				vertical-align: middle;
				display: table-cell;
				border: solid 1px #ccc;
			}
			
			.family-report5 .title {
				text-align: center;
			}
			.family-report5 .yw-group{
				border: solid 1px #ccc;padding: 10px 10px 0px;
			}
			.family-report5 .yw-group .input-group{
				margin-bottom: 10px;
			}
			.family-report5 .group-no-1{
				float: left;margin-right: 5%;width: 45%;
			}

</style>
